//
//  DSScanvasView.h
//  Note
//
//  Created by DongSen on 2018/9/11.
//  Copyright © 2018年 董森森. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef void(^PSCanvasViewBlock)(BOOL draws);

@interface DSScanvasView : UIView
/** 擦除模式 */
@property(nonatomic, assign) BOOL eraserMode;
/**
 擦除的笔刷半径
 默认 10
 */
@property(nonatomic, assign) CGFloat eraserRadius;
/** 路径条数 */
@property(nonatomic, assign, readonly) NSUInteger pathCount;
/** 获取截图 */
@property(nonatomic, strong, readonly) UIImage * snapImage;

@property(nonatomic, copy) PSCanvasViewBlock block;

@property(nonatomic, copy) UIBezierPath *bPath;

@property(nonatomic, strong) NSMutableArray *paths;

@property(nonatomic, strong) NSMutableArray *backPaths;

@property(nonatomic, strong) UIColor * pathColor;



/** 清除所有路径 */
- (void)clearAllPaths;

/** 回退到上一条路径 */
- (void)back;
/**
 *  恢复一条已回退的路径
 *  注意: 绘制操作会清空已回退的路径
 */
- (void)forward;

@end
